package com.lilicould.dao;

import com.lilicould.entity.Majors;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MajorDao {
    @Select("select * from majors order by major_code")
    List<Majors> getAllMajor();

    @Insert("insert into majors values(#{majorCode},#{majorName},#{collegeCode})")
    int addMajor(Majors major);

    @Delete("delete from majors where major_code = #{majorCode}")
    int deleteMajor(String majorCode);
}
